import { reactive } from "vue";
import type { FormRules } from "element-plus";

/** 自定义表单规则校验 */
export const formRules = reactive<FormRules>({
  eventId: [{ required: true, message: "请选择所属事件", trigger: "blur" }],
  segment: [
    { required: true, message: "段号为必填项", trigger: "blur" },
    { type: "number", message: "段号必须为数字", trigger: "blur" }
  ],
  actionName: [
    { required: true, message: "动作名称为必填项", trigger: "blur" }
  ],
  params: [{ required: true, message: "动作参数为必填项", trigger: "blur" }]
});
